// Problem: 
// Contest: 
// URL: 
// Memory Limit: 
// Time Limit: 
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include<bits/stdc++.h>
using namespace std;
#define int long long
inline int read(){
	int s=0,w=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
	while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
	return s*w;
}
double n,p;
vector<double> a,b;
int f(double x)
{
	double y=p,sum=0;
	for(int i=1;i<=n;i++)
	{
		sum+=a[i];
		if(b[i]/a[i]<x)y-=abs(b[i]/x-a[i]);
	}
	if(y<0)return 0;
	else if(sum<=p)return 2;
	else return 1;
}
signed main()
{
	cin>>n>>p;
	a=b=vector<double>(n+1);
	for(int i=1;i<=n;i++)cin>>a[i]>>b[i];
	double l=0,r=1e10;
	while(r-l>0.000001)
	{
		double mid=(r-l)/2+l;
		if(f(mid)==1)l=mid;
		else if(f(mid)==0)r=mid-0.000001;
		else if(f(mid)==2)
		{
			cout<<-1;
			return 0;
		}
	}
	printf("%0.6f",l);
	return 0;
}
